package zerous.craft.world;

import android.graphics.*;

import zerous.craft.BlockData;

public class World
{
	private int Width,Height;
	private int[][] world;
	public World(int width,int height)
	{
		Width = width;
		Height = height;
		world = new int[width][height];
		
		
	}
	
	public void create()
	{
		for(int i = 0;i<world.length;i++)
		{
			for(int j = 0;j<world[0].length;j++)
			{

				world[i][j]=0;
				if(i>=16)
					world[i][j]=2;
				if(i==16)
					world[i][j]=1;
				if(i<=20&&i>16)
					world[i][j]=3;
			}
		}
	}
	
	public void draw(Canvas c,Paint p)
	{
		for(int i = 0;i < world.length;i++)
		{
			for(int j = 0;j < world[0].length;j++)
			{
				if(world[i][j] == 0)
				{
					i++;
					j++;
				}
				
				if(world[i][j]==1)
				{
					BlockData.Grass.draw(c,p,i+32,j+32);
				}
				
				if(world[i][j]==2)
				{
					
				}
			}
		}
	}
}
